project(barrier)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

aux_source_directory(. barrier_dir)

# 扫描 pthread 库
find_package(Threads)

add_executable(barrier_main ${barrier_dir})

# 将 pthread 库 链接到 main 中
target_link_libraries(barrier_main ${CMAKE_THREAD_LIBS_INIT})

target_link_libraries(barrier_main libbsd0)